@import 'sass/variables';

.GasPriceSlider {
  $handleSize: 20px;
  $stepSize: 12px;

  margin-top: 0;
  margin-bottom: 0;

  &-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    > .GasPriceSlider-slider {
      width: calc(100% - #{$stepSize}); // steps overflow, so limit the size of the container
      margin-left: calc(-#{$stepSize / 3}); // the slider is not balanced so arbitrary corrections

      > .rc-slider {
        > .rc-slider-step > .rc-slider-dot {
          height: $stepSize;
          width: $stepSize;
          bottom: -3px;
          background-color: #fff;
          border: solid 1px rgba(102, 170, 229, 0.3);
          box-shadow: 0 1px 1px 0 rgba(232, 234, 237, 0.5);
        }

        > .rc-slider-rail {
          background-color: $bright-sky-blue;
          opacity: 0.22;
        }

        > .rc-slider-track {
          background-color: $bright-sky-blue;
          visibility: visible !important;
          opacity: 1;
        }

        > .rc-slider-handle {
          width: $handleSize;
          height: $handleSize;
          background-color: #fff;
          box-shadow: 0 1px 1px 0 rgba(232, 234, 237, 0.5);
          border: solid 1px $bright-sky-blue;
        }
      }
    }

    > .FeeSummary {
      margin-left: $space;
      min-width: 224px;
    }

    @media screen and (max-width: $screen-md) {
      flex-wrap: wrap;

      > .FeeSummary {
        width: 100%;
        margin-left: 0;
      }
    }
  }

  &-slider {
    padding-top: 8px;
    margin-bottom: $space-xs;

    &-labels {
      margin-top: 4px;
      display: flex;

      > span {
        flex: 1;
        padding: 0;
        text-align: center;
        color: shade-dark(0.4);
        font-size: $font-size-xs;

        &:first-child {
          text-align: left;
          margin-left: calc(-#{$stepSize / 6});
        }

        &:last-child {
          text-align: right;
          margin-right: calc(-#{$stepSize / 2});
        }
      }
    }
  }
}
